Skip to content

Conversation

@IMinchev64
Copy link
Contributor

Related to this task

This PR refactors the entire Ignite UI for Angular component library to use the Angular inject() API instead of constructor-based dependency injection.

Additional information (check all that apply):

  • Bug fix
  • New functionality
  • Documentation
  • Demos
  • CI/CD

Checklist:

  • All relevant tags have been applied to this PR
  • This PR includes unit tests covering all the new code (test guidelines)
  • This PR includes API docs for newly added methods/properties (api docs guidelines)
  • This PR includes feature/README.MD updates for the feature docs
  • This PR includes general feature table updates in the root README.MD
  • This PR includes CHANGELOG.MD updates for newly added functionality
  • This PR contains breaking changes
  • This PR includes ng update migrations for the breaking changes (migrations guidelines)
  • This PR includes behavioral changes and the feature specification has been updated with them

@IMinchev64 IMinchev64 marked this pull request as ready for review August 11, 2025 12:12
@dkamburov dkamburov requested a review from Copilot November 13, 2025 09:41
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the Ignite UI for Angular component library to use Angular's inject() API instead of constructor-based dependency injection, aligning with modern Angular best practices.

Key Changes:

  • Migration from constructor parameters to inject() function for dependency injection
  • Updates to test files to use TestBed for component instantiation instead of manual constructors
  • Conversion of injection tokens from string literals to InjectionToken objects

Reviewed Changes

Copilot reviewed 278 out of 278 changed files in this pull request and generated no comments.

Show a summary per file
File Description
projects/igniteui-angular/src/lib/tree/tree.component.ts Migrated constructor DI to inject() API
projects/igniteui-angular/src/lib/tree/tree-node/tree-node.component.ts Replaced constructor injection with inject() calls
projects/igniteui-angular/src/lib/tree/tree.spec.ts Updated tests to use TestBed for component creation
projects/igniteui-angular/src/lib/time-picker/time-picker.common.ts Changed token from string to InjectionToken
projects/igniteui-angular/src/lib/time-picker/time-picker.component.ts Migrated to inject() API
projects/igniteui-angular/src/lib/grids/pivot-grid/pivot-grid.component.ts Removed large constructor, migrated to inject()
projects/igniteui-angular/src/lib/services/overlay/overlay.ts Converted to inject() API
projects/igniteui-angular/src/lib/icon/icon.service.ts Migrated all constructor parameters to inject()


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dkamburov
Copy link
Contributor

@copilot can you do deep review on the PR and the tests modifieid

Copy link
Contributor

Copilot AI commented Nov 13, 2025

@dkamburov I've opened a new pull request, #16453, to work on those changes. Once the pull request is ready, I'll request review from you.

@ChronosSF ChronosSF requested a review from Copilot November 25, 2025 09:23
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 274 out of 274 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dkamburov
Copy link
Contributor

dkamburov commented Nov 25, 2025

@IMinchev64 conflicts again :(
Also please review(apply or dismiss) the findings from the code-quality bot.

@@ -1,4 +1,4 @@
import { ChangeDetectionStrategy, Component, DebugElement, ViewChild, ElementRef, OnInit } from '@angular/core';
import { ChangeDetectionStrategy, Component, DebugElement, ViewChild, ElementRef, OnInit, inject as inject_1 } from '@angular/core';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this is renamed to inject_1?

@dkamburov
Copy link
Contributor

image @IMinchev64 please update these as well.

@dkamburov dkamburov merged commit 661153b into master Nov 28, 2025
7 checks passed
@dkamburov dkamburov deleted the iminchev/di-constructor-to-inject branch November 28, 2025 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants